package com.ces.knacky.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractChildEntity;

/** @author Hibernate CodeGenerator */
public class OrderInventory extends AbstractChildEntity implements Serializable {

    /** persistent field */
    private com.ces.knacky.model.OrderTable order;

    /** persistent field */
    private com.ces.knacky.model.Inventory inventory;

    /** full constructor */
    public OrderInventory(com.ces.knacky.model.OrderTable order, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Inventory inventory) {
        this.order = order;
        this.inventory = inventory;
        this.flag = flag;
        this.inventory = inventory;
    }

    /** default constructor */
    public OrderInventory() {
    }

    public com.ces.knacky.model.OrderTable getOrder() {
        return this.order;
    }

    public void setOrder(com.ces.knacky.model.OrderTable order) {
        this.order = order;
    }

    public com.ces.knacky.model.Inventory getInventory() {
        return this.inventory;
    }

    public void setInventory(com.ces.knacky.model.Inventory inventory) {
        this.inventory = inventory;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof OrderInventory) ) return false;
        OrderInventory castOther = (OrderInventory) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
